package util;

import java.sql.Driver;
import java.sql.DriverManager;

public class DBConnection {
public class BConnection {
        private String FileName;
        private int DBType;
        private Connection conn;
        private String MysqlDriver;
        private String MysqlURL;
        public DBConnection() {

            conn = null;
        }
        public Connection getConn() {
            DBType = 1;
            switch (DBType){
                case 1:return(getConnToMySql());
                default:return null;
            }
        }
        public Connection getConnToMySql() {
            try{
                MysqlDriver = "org.gjt.mm.mysql.Driver";
                MysqlURL = "jdbc:mysql://127.0.0.0:3306/unit7website?user=fairchild&password= huiko8213@K&useUnicode=true&characterEncoding=UTF-8";
                Class.forName(MysqlDriver).newInstance();
                conn= DriverManager.getConnection(MysqlURL);
            }catch (Exception e) {
}
